<!--
 * @Author: your name
 * @Date: 2022-02-28 23:15:28
 * @LastEditTime: 2022-03-20 19:40:46
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \blog_web\src\views\home\home.vue
-->

<template>
  <div class="page_container">
    <Header :user="user" />
    <Main :user="user" />
    <Footer />
  </div>
</template>

<script>
// 导入本地存储的函数
import db from '@/util/localstorage'
import Header from './header/Header.vue'
import Main from './main/Main.vue'
import Footer from './footer/Footer.vue'
export default {
  name: 'home',
  components: {
    Header,
    Main,
    Footer
  },
  data() {
    return {
      user: {}
    }
  },
  created() {
    // 取出存储的用户信息
    this.user = db.get('user')
  }
}
</script>

<style lang="scss" scoped>
.page_container {
  height: 100%;
  width: 100%;
}
</style>
